Optimal. Leaf size=610 \[ -\frac {2^{2/3} \sqrt {3} c^{2/3} \tan ^{-1}\left (\frac {1-\frac {2 \sqrt [3]{2} \sqrt [3]{c} x^{n/3}}{\sqrt [3]{b-\sqrt {b^2-4 a c}}}}{\sqrt {3}}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {2^{2/3} \sqrt {3} c^{2/3} \tan ^{-1}\left (\frac {1-\frac {2 \sqrt [3]{2} \sqrt [3]{c} x^{n/3}}{\sqrt [3]{b+\sqrt {b^2-4 a c}}}}{\sqrt {3}}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{b-\sqrt {b^2-4 a c}}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{b+\sqrt {b^2-4 a c}}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {c^{2/3} \log \left (\left (b-\sqrt {b^2-4 a c}\right )^{2/3}-\sqrt [3]{2} \sqrt [3]{c} \sqrt [3]{b-\sqrt {b^2-4 a c}} x^{n/3}+2^{2/3} c^{2/3} x^{2 n/3}\right )}{\sqrt [3]{2} \sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {c^{2/3} \log \left (\left (b+\sqrt {b^2-4 a c}\right )^{2/3}-\sqrt [3]{2} \sqrt [3]{c} \sqrt [3]{b+\sqrt {b^2-4 a c}} x^{n/3}+2^{2/3} c^{2/3} x^{2 n/3}\right )}{\sqrt [3]{2} \sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.71, antiderivative size = 610, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {1395, 1361,
206, 31, 648, 631, 210, 642} \begin {gather*} -\frac {2^{2/3} \sqrt {3} c^{2/3} \text {ArcTan}\left (\frac {1-\frac {2 \sqrt [3]{2} \sqrt [3]{c} x^{n/3}}{\sqrt [3]{b-\sqrt {b^2-4 a c}}}}{\sqrt {3}}\right )}{n \sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3}}+\frac {2^{2/3} \sqrt {3} c^{2/3} \text {ArcTan}\left (\frac {1-\frac {2 \sqrt [3]{2} \sqrt [3]{c} x^{n/3}}{\sqrt [3]{\sqrt {b^2-4 a c}+b}}}{\sqrt {3}}\right )}{n \sqrt {b^2-4 a c} \left (\sqrt {b^2-4 a c}+b\right )^{2/3}}+\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{b-\sqrt {b^2-4 a c}}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{n \sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3}}-\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{\sqrt {b^2-4 a c}+b}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{n \sqrt {b^2-4 a c} \left (\sqrt {b^2-4 a c}+b\right )^{2/3}}-\frac {c^{2/3} \log \left (-\sqrt [3]{2} \sqrt [3]{c} x^{n/3} \sqrt [3]{b-\sqrt {b^2-4 a c}}+\left (b-\sqrt {b^2-4 a c}\right )^{2/3}+2^{2/3} c^{2/3} x^{2 n/3}\right )}{\sqrt [3]{2} n \sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3}}+\frac {c^{2/3} \log \left (-\sqrt [3]{2} \sqrt [3]{c} x^{n/3} \sqrt [3]{\sqrt {b^2-4 a c}+b}+\left (\sqrt {b^2-4 a c}+b\right )^{2/3}+2^{2/3} c^{2/3} x^{2 n/3}\right )}{\sqrt [3]{2} n \sqrt {b^2-4 a c} \left (\sqrt {b^2-4 a c}+b\right )^{2/3}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 206
Rule 210
Rule 631
Rule 642
Rule 648
Rule 1361
Rule 1395
Rubi steps
\begin {align*} \int \frac {x^{-1+\frac {n}{3}}}{a+b x^n+c x^{2 n}} \, dx &=\frac {3 \text {Subst}\left (\int \frac {1}{a+b x^3+c x^6} \, dx,x,x^{n/3}\right )}{n}\\ &=\frac {(3 c) \text {Subst}\left (\int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^3} \, dx,x,x^{n/3}\right )}{\sqrt {b^2-4 a c} n}-\frac {(3 c) \text {Subst}\left (\int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^3} \, dx,x,x^{n/3}\right )}{\sqrt {b^2-4 a c} n}\\ &=\frac {\left (2^{2/3} c\right ) \text {Subst}\left (\int \frac {1}{\frac {\sqrt [3]{b-\sqrt {b^2-4 a c}}}{\sqrt [3]{2}}+\sqrt [3]{c} x} \, dx,x,x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {\left (2^{2/3} c\right ) \text {Subst}\left (\int \frac {2^{2/3} \sqrt [3]{b-\sqrt {b^2-4 a c}}-\sqrt [3]{c} x}{\frac {\left (b-\sqrt {b^2-4 a c}\right )^{2/3}}{2^{2/3}}-\frac {\sqrt [3]{c} \sqrt [3]{b-\sqrt {b^2-4 a c}} x}{\sqrt [3]{2}}+c^{2/3} x^2} \, dx,x,x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {\left (2^{2/3} c\right ) \text {Subst}\left (\int \frac {1}{\frac {\sqrt [3]{b+\sqrt {b^2-4 a c}}}{\sqrt [3]{2}}+\sqrt [3]{c} x} \, dx,x,x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {\left (2^{2/3} c\right ) \text {Subst}\left (\int \frac {2^{2/3} \sqrt [3]{b+\sqrt {b^2-4 a c}}-\sqrt [3]{c} x}{\frac {\left (b+\sqrt {b^2-4 a c}\right )^{2/3}}{2^{2/3}}-\frac {\sqrt [3]{c} \sqrt [3]{b+\sqrt {b^2-4 a c}} x}{\sqrt [3]{2}}+c^{2/3} x^2} \, dx,x,x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}\\ &=\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{b-\sqrt {b^2-4 a c}}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{b+\sqrt {b^2-4 a c}}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {c^{2/3} \text {Subst}\left (\int \frac {-\frac {\sqrt [3]{c} \sqrt [3]{b-\sqrt {b^2-4 a c}}}{\sqrt [3]{2}}+2 c^{2/3} x}{\frac {\left (b-\sqrt {b^2-4 a c}\right )^{2/3}}{2^{2/3}}-\frac {\sqrt [3]{c} \sqrt [3]{b-\sqrt {b^2-4 a c}} x}{\sqrt [3]{2}}+c^{2/3} x^2} \, dx,x,x^{n/3}\right )}{\sqrt [3]{2} \sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {(3 c) \text {Subst}\left (\int \frac {1}{\frac {\left (b-\sqrt {b^2-4 a c}\right )^{2/3}}{2^{2/3}}-\frac {\sqrt [3]{c} \sqrt [3]{b-\sqrt {b^2-4 a c}} x}{\sqrt [3]{2}}+c^{2/3} x^2} \, dx,x,x^{n/3}\right )}{2^{2/3} \sqrt {b^2-4 a c} \sqrt [3]{b-\sqrt {b^2-4 a c}} n}+\frac {c^{2/3} \text {Subst}\left (\int \frac {-\frac {\sqrt [3]{c} \sqrt [3]{b+\sqrt {b^2-4 a c}}}{\sqrt [3]{2}}+2 c^{2/3} x}{\frac {\left (b+\sqrt {b^2-4 a c}\right )^{2/3}}{2^{2/3}}-\frac {\sqrt [3]{c} \sqrt [3]{b+\sqrt {b^2-4 a c}} x}{\sqrt [3]{2}}+c^{2/3} x^2} \, dx,x,x^{n/3}\right )}{\sqrt [3]{2} \sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {(3 c) \text {Subst}\left (\int \frac {1}{\frac {\left (b+\sqrt {b^2-4 a c}\right )^{2/3}}{2^{2/3}}-\frac {\sqrt [3]{c} \sqrt [3]{b+\sqrt {b^2-4 a c}} x}{\sqrt [3]{2}}+c^{2/3} x^2} \, dx,x,x^{n/3}\right )}{2^{2/3} \sqrt {b^2-4 a c} \sqrt [3]{b+\sqrt {b^2-4 a c}} n}\\ &=\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{b-\sqrt {b^2-4 a c}}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{b+\sqrt {b^2-4 a c}}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {c^{2/3} \log \left (\left (b-\sqrt {b^2-4 a c}\right )^{2/3}-\sqrt [3]{2} \sqrt [3]{c} \sqrt [3]{b-\sqrt {b^2-4 a c}} x^{n/3}+2^{2/3} c^{2/3} x^{2 n/3}\right )}{\sqrt [3]{2} \sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {c^{2/3} \log \left (\left (b+\sqrt {b^2-4 a c}\right )^{2/3}-\sqrt [3]{2} \sqrt [3]{c} \sqrt [3]{b+\sqrt {b^2-4 a c}} x^{n/3}+2^{2/3} c^{2/3} x^{2 n/3}\right )}{\sqrt [3]{2} \sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {\left (3\ 2^{2/3} c^{2/3}\right ) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1-\frac {2 \sqrt [3]{2} \sqrt [3]{c} x^{n/3}}{\sqrt [3]{b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {\left (3\ 2^{2/3} c^{2/3}\right ) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1-\frac {2 \sqrt [3]{2} \sqrt [3]{c} x^{n/3}}{\sqrt [3]{b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}\\ &=-\frac {2^{2/3} \sqrt {3} c^{2/3} \tan ^{-1}\left (\frac {1-\frac {2 \sqrt [3]{2} \sqrt [3]{c} x^{n/3}}{\sqrt [3]{b-\sqrt {b^2-4 a c}}}}{\sqrt {3}}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {2^{2/3} \sqrt {3} c^{2/3} \tan ^{-1}\left (\frac {1-\frac {2 \sqrt [3]{2} \sqrt [3]{c} x^{n/3}}{\sqrt [3]{b+\sqrt {b^2-4 a c}}}}{\sqrt {3}}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{b-\sqrt {b^2-4 a c}}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {2^{2/3} c^{2/3} \log \left (\sqrt [3]{b+\sqrt {b^2-4 a c}}+\sqrt [3]{2} \sqrt [3]{c} x^{n/3}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}-\frac {c^{2/3} \log \left (\left (b-\sqrt {b^2-4 a c}\right )^{2/3}-\sqrt [3]{2} \sqrt [3]{c} \sqrt [3]{b-\sqrt {b^2-4 a c}} x^{n/3}+2^{2/3} c^{2/3} x^{2 n/3}\right )}{\sqrt [3]{2} \sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right )^{2/3} n}+\frac {c^{2/3} \log \left (\left (b+\sqrt {b^2-4 a c}\right )^{2/3}-\sqrt [3]{2} \sqrt [3]{c} \sqrt [3]{b+\sqrt {b^2-4 a c}} x^{n/3}+2^{2/3} c^{2/3} x^{2 n/3}\right )}{\sqrt [3]{2} \sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right )^{2/3} n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.12, size = 62, normalized size = 0.10 \begin {gather*} \frac {\text {RootSum}\left [a+b \text {$\#$1}^3+c \text {$\#$1}^6\&,\frac {-n \log (x)+3 \log \left (x^{n/3}-\text {$\#$1}\right )}{b \text {$\#$1}^2+2 c \text {$\#$1}^5}\&\right ]}{3 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.31, size = 260, normalized size = 0.43
method | result | size |
risch | \(\munderset {\textit {\_R} =\RootOf \left (\left (64 a^{5} c^{3} n^{6}-48 a^{4} b^{2} c^{2} n^{6}+12 a^{3} b^{4} c \,n^{6}-a^{2} b^{6} n^{6}\right ) \textit {\_Z}^{6}+\left (16 a^{2} b \,c^{2} n^{3}-8 a \,b^{3} c \,n^{3}+b^{5} n^{3}\right ) \textit {\_Z}^{3}+c^{2}\right )}{\sum }\textit {\_R} \ln \left (x^{\frac {n}{3}}+\left (-\frac {16 n^{4} b \,a^{4} c^{2}}{2 c^{2} a -b^{2} c}+\frac {8 n^{4} b^{3} a^{3} c}{2 c^{2} a -b^{2} c}-\frac {n^{4} b^{5} a^{2}}{2 c^{2} a -b^{2} c}\right ) \textit {\_R}^{4}+\left (\frac {4 n \,a^{2} c^{2}}{2 c^{2} a -b^{2} c}-\frac {5 n \,b^{2} a c}{2 c^{2} a -b^{2} c}+\frac {n \,b^{4}}{2 c^{2} a -b^{2} c}\right ) \textit {\_R} \right )\) | \(260\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 4699 vs.
\(2 (465) = 930\).
time = 0.61, size = 4699, normalized size = 7.70 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x^{\frac {n}{3}-1}}{a+b\,x^n+c\,x^{2\,n}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________